<template>
  <div class="item">
    <router-link class="item-container" :to="'/detail/' + data.id" tag="div">
      <img :src="'/img/list/' + data.img" alt>
      <div class="content">
        <h3>{{data.title}}</h3>
        <p>
          <span class="price">
            {{data.price}}
            <em>元</em>
          </span>
          <span class="orgin-price">门市价{{data.originPrice}}元</span>
          <span class="sales">销量{{data.sales}}</span>
        </p>
      </div>
    </router-link>
  </div>
</template>


<style type="text/css" scoped lang="scss">
@import "../base.scss";
.item {
  background-color: #fff;
  .item-container {
    margin: 0 10px;
    padding: 10px 0;
    border-bottom: 1px solid #ccc;
    display: flex;
  }

  img {
    width: 100px;
    height: 60px;
  }
  .content {
    flex: 1;
    padding-left: 10px;
    h3 {
      height: 43px;
      font-size: 15px;
      font-weight: 500;
      color: #333;
    }
    p {
      font-size: 12px;
    }
    .price {
      color: $navColor;
      font-size: 16px;
      margin-right: 5px;
      em {
        font-size: 0.26rem;
        font-style: normal;
      }
    }
    .sales {
      float: right;
      color: #333;
      line-height: 23px;
    }
  }
}
</style>





<script>
export default {
  props: ["data"]
  //   created() {
  //       console.log(this.data)
  //   },
};
</script>
